package com.qyhl.shop.shop.rush.detail.order;

import com.qyhl.webtv.commonlib.entity.shop.ShopGiftDetailBean;
import com.qyhl.webtv.commonlib.entity.shop.ShopPayResultBean;

public class ShopOrderPresenter implements ShopOrderContract.ShopOrderPresenter {
    private ShopOrderContract.ShopOrderView mView;
    private ShopOrderModel mModel;

    public ShopOrderPresenter(ShopOrderContract.ShopOrderView mView) {
        this.mView = mView;
        this.mModel = new ShopOrderModel(this);
    }

    @Override
    public void getDetail(int userGiftId) {
        mModel.getDetail(userGiftId);
    }

    @Override
    public void pay(int userGiftId, String phoneNum, String sign, int payType) {
        mModel.pay(userGiftId, phoneNum, sign, payType);
    }

    @Override
    public void paySuccess(ShopPayResultBean bean) {
        mView.paySuccess(bean);
    }

    @Override
    public void payError(String msg) {
        mView.payError(msg);
    }

    @Override
    public void setDetail(ShopGiftDetailBean bean) {
        mView.setDetail(bean);
    }

    @Override
    public void setError(String msg) {
        mView.setError(msg);
    }
}
